package com.push.mq.base;

import android.content.Intent;
import android.os.Bundle;
import android.support.annotation.Nullable;
import android.view.KeyEvent;

public abstract class BaseRecordActivity extends BaseActivity {

    @Override
    protected void onPostCreate(@Nullable Bundle savedInstanceState) {
        super.onPostCreate(savedInstanceState);
        ActImpl.STATE = "";
    }

    @Override
    protected void onResume() {
        ActImpl.STATE = "";
        super.onResume();
    }

    @Override
    protected void onNewIntent(Intent intent) {
        ActImpl.STATE = "";
        super.onNewIntent(intent);
    }

    @Override
    protected void onPause() {
        ActImpl.STATE = ActImpl.PAUSE;
        super.onPause();
    }

    @Override
    protected void onStart() {
        ActImpl.STATE = "";
        super.onStart();
    }

    @Override
    protected void onStop() {
        ActImpl.STATE = ActImpl.STOP;
        super.onStop();
    }

    @Override
    public boolean onKeyDown(int keyCode, KeyEvent event) {
        if (keyCode == KeyEvent.KEYCODE_BACK) {
            return true;
        }
        return super.onKeyDown(keyCode, event);
    }
}
